﻿<Window x:Class="SecurityAdminSuite.AddUserToGroupDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Background="White"
        ResizeMode="NoResize"
        WindowStyle="ToolWindow"
    Title="Add User to Group" Height="321" Width="302">
    <StackPanel Margin="5,5,5,5">

        <Grid  DockPanel.Dock="Top" Margin="0,5,0,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Label Content="Filter: "/>
            <TextBox Grid.Column="1" Foreground="Black" Text="{Binding UsernameFilter,UpdateSourceTrigger=PropertyChanged}"/>
        </Grid>

        <ListBox  Height="200"
                        SelectionMode="Extended"
                         x:Name="lbUsers" ItemsSource="{Binding Path=Users}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="30"/>
                            <ColumnDefinition Width="200"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <!--<Image Width="15" Height="15" Source="pack://siteoforigin:,,,/Images/User.png" Grid.Row="0" Grid.Column="0"/>-->
                        <Image Width="15" Height="15" Source="Images\User.png" Grid.Row="0" Grid.Column="0"/>
                        <TextBlock Text="{Binding User.Account}" Grid.Row="0" Grid.Column="1"/>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        
        <Grid Margin="0,5,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="15*" />
                <RowDefinition Height="18*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Button x:Name="btOk" Click="btOk_Click" Margin="5 5 2.5 5">
                <Button.Content>
                    <TextBlock Text="Ok" TextAlignment="Center"/>
                </Button.Content>
            </Button>
            <Button x:Name="btCancel" Click="btCancel_Click" Grid.Column="1" Margin="2.5 5 5 5">
                <Button.Content>
                    <TextBlock Text="Cancel" TextAlignment="Center"/>
                </Button.Content>
            </Button>
        </Grid>


    </StackPanel>
</Window>
